
from .. import db
from datetime import datetime


class Phone(db.Model):
    __tablename__ = 'phones'
    id = db.Column(db.Integer, primary_key=True)
    country_code = db.Column(db.String(10))
    phone_num = db.Column(db.String(20))
    phone_code_url = db.Column(db.String(100))
    app_type = db.Column(db.String(10))
    carrier = db.Column(db.String(50))
    has_vip = db.Column(db.Integer, default=0)
    created_at = db.Column(db.DateTime, default=datetime.now())
    __table_args__ = (db.UniqueConstraint('country_code', 'phone_num'), )
